{% load i18n %}
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{% trans 'Welcome To e-ZhangBen...' %}</title>
    <link rel="stylesheet" type="text/css" href="css/core.css" />
    <script type="text/javascript" src="jquery-1.4.3.js"></script>
  </head>
  <body>
    <div class="PageBackgroundSimpleGradient"> </div>
    <div class="Main">
      <div class="Sheet">
	<div class="Sheet-tl"></div>
	<div class="Sheet-tr"><div></div></div>
	<div class="Sheet-bl"><div></div></div>
	<div class="Sheet-br"><div></div></div>
	<div class="Sheet-tc"><div></div></div>
	<div class="Sheet-bc"><div></div></div>
	<div class="Sheet-cl"><div></div></div>
	<div class="Sheet-cr"><div></div></div>
	<div class="Sheet-body">
	  <div class="Header">
	    <div class="Header-jpeg"></div>
	    <div class="logo">
	      <h1 id="name-text" class="logo-name">
		<a href="#"> {% trans "e-Zhangben"%}</a></h1>
	      <div id="slogan-text" class="logo-text">
		{{usernickname}},{% trans 'Today is'%}({{TODAY}}){% trans ',Welcome.'%}</div>
	      <div class="Sheet-cc"></div>
	      <div id="logout" align = "right">
		<a href="{{ logout_url }}">{% trans 'Exit' %}</a>
	      </div>
	    </div>
	  </div>
	  <script type="text/javascript" src="js-page.js"></script>
	  <div class="nav">
	    <ul class="artmenu" >
	      <li><a class="menubutton" id="addexpense" href="#"><span><span>{% trans 'Add Expense' %} </span></span></a></li>
	      <li><a class="menubutton" id="showmyexpense" href="#"><span><span>{% trans 'See Expense' %} </span></span></a></li>
	      <li class="menubutton" ><a id="addincomebutton" href="#"><span><span>{% trans 'Add Income' %} </span></span></a></li>
	      <div class="l">
	      </div> <div class="r"></div></div>
	  <div id="incomepage" class="mypages">
	    <h2> {% trans 'Add Income Title' %}</h2>
	    <form action="/addincome" id="incomeform" method="post" enctype="application/x-www-form-urlencoded">
	      {% trans "What's income catelog?" %}<br />
	      {% for income in incoming_dic %}
	      {% ifequal income.name "salary" %} <input type = "radio" name = "incomesource" value = {{income.name}} checked="yes" >{% trans income.name %} {% else %} <input type = "radio" name = "incomesource" value = {{income.name}} >{% trans income.name %}{% endifequal %} {% endfor %}   <br />{% trans 'How much of income?' %}<br>
	      <input type = "text" name = "amount" autocomplete="off"> <br />
	      {% trans 'Notes' %} <br>
	      <textarea name = "notes" rows = "2" cols="60"></textarea> <br >
	      <input type="submit" autocomplete="off" value="{% trans 'Add Income' %}">
	      <input type="reset" autocomplete="off" value="{% trans 'Reset' %}">
	    </form>
	  </div>
	  <div class="mypages" id="expense" >

	    <h2>{% trans 'Expense Title' %}</h2>
	    <form action="/addexpense" method="post">
	      <div color="blue" > {% trans "For Who" %}<br /> </div>
	      {% for who in expense_to_whom_table %}
	      {% ifequal who.name "I" %}
	      <input type = "radio" name = "expense_to_whom" value = "{{who.name}}" checked="yes"> {% trans who.name %}{% else %} <input type = "radio" name = "expense_to_whom" value = "{{who.name}}">{% trans who.trans %}{% endifequal %}
	      {% endfor %}
	      <div color="blue"> {% trans "Which expense belongs?" %}<br /> </div>
	      {% for catelog in expense_catelog_table %}
	      <input type = "radio" name = "expense_catelog" value = "{{catelog.name}}" {% ifequal catelog.name "Eating" %}  checked="yes" {% endifequal%}>{% trans catelog.name %}
	      {% endfor %}
	      <div color = "blue"> {% trans "Through ?"%} <br /> </div>
	      {% for through in expense_through_table %}
	      {% ifequal through.name "Cash" %}
	      <input type = "radio" name = "expense_through" value="{{through.name}}" checked="yes">{% trans through.name %}
	      {% else %}
	      <input type = "radio" name = "expense_through" value="{{through.name}}">{% trans through.name %}
	      {% endifequal %}
	      {% endfor %}
	      <div color = "blue"> {% trans "How much?" %}<br /> </div>
	      <input type = "text" name = "amount" autocomplete="off"> <br />
	      <div color="blue"> {% trans "Notes:" %} <br /></div>
	      <textarea name = "notes" rows = "2" cols="60"></textarea> <br >
	      <input type="submit" value={% trans "Add Expense summit" %}>
	      <input type="reset" value={% trans "Reset"%} >
	  </div>
	  </form>
	  <div class="mypages" id="myaccountpage">
	    <h2> {% trans "Account Records Title" %}</h2>
	    {% trans "Balance:" %} {% trans "money unit"%}<b>{{ TOTALMONEY }}<br></b>
	    <div class="accountinpage">
	      {# Dump the records #}
	      <div class="atable">
		<table border="1px">
		  <tr>
		    <th> {% trans "In or Out" %} </th> <th> {% trans "How much" %} </th> <th> {% trans "Date" %} </th><th> {% trans "Type" %} </th> <th> {% trans "Through" %} </th>  <th> {% trans "Who" %} </th><th widget = "100px" > {% trans "Notes" %} </th> </tr>
		  {% for theq in querys %}
		  <tr><th>{% if theq.is_pay %} {% trans "Expense" %}{% else %}   {% trans "Income" %}    {% endif %} </th><th align="left"> {% if theq.is_pay %} - {% endif %} {% trans "money unit" %} {{ theq.amountnum|escape}} </th><th> {{theq.date.date}} </th>{% if theq.is_pay %}<th> {% trans theq.expense_catelog %} </th> <th> {% trans theq.expense_through %}  </th> <th> {% trans theq.expense_to_whom	%} </th>{% else %} <th> {% trans theq.income_source %} </th>   <th>.</th>   <th>.</th>{% endif %}<th align = "left" > {{theq.notes}} </th> </tr>
		  {% endfor %}
		</table>
      </div> </div></div></div></div>
      <div class="cleared"></div>
      <div class="Footer">
	<div class="Footer-inner">
	  <div class="Footer-text">
	    <p> Copyright &copy; 2010 Zoe.Jason. All Rights Reserved. </p>
	    <div id=hidden style='display:none;'></div>
	  </div>
	</div>
      </div>
  </body>
</html>
